<template>
	<view class="uiwu-header" :style="{'height':uiwu.headHeight() + uiwu.statusBar() +'px'}">
		<view class="header uiwu-flex-center" :style="{'padding-top': uiwu.statusBar() +'px','height':uiwu.headHeight() + uiwu.statusBar() +'px'}">
			<image v-if="headerIndex == 0" src="/static/indextitle.png" mode="widthFix"></image>
			<image v-if="headerIndex == 1" src="/static/jifentitle.png" mode="widthFix"></image>
			<image v-if="headerIndex == 2" src="/static/chongzhititle.png" mode="widthFix"></image>
			<image v-if="headerIndex == 3" src="/static/usetitle.png" mode="widthFix"></image>
			<view v-if="headerIndex == 0" class="msg">
				<text v-if="is_see"></text>
				<image @tap.stop="uiwu.openWindow('/pages/index/notice')" src="../../static/indexmsg.png" mode="widthFix"></image>
			</view>
		</view>
	</view>
</template>

<script setup lang="ts">
	import { inject } from "vue"
	defineProps({
		headerIndex:{
			default:0,
			type:[String,Number]
		},
		is_see:{
			default:0,
			type:[Number,String]
		}
	})
	const uiwu = inject<any>('uiwu')
</script>

<style lang="scss">
	.uiwu-header{
		background-color: #272323;
		.header{
			position: fixed;
			left: 0;
			right: 0;
			top: 0;
			background-color: #272323;
			z-index: 95;
			>image{
				width: 234rpx;
			}
			.msg{
				position: absolute;
				z-index: 99;
				/* #ifndef APP-PLUS */
				left: 20rpx;
				/* #endif */
				/* #ifdef APP-PLUS */
				right: 20rpx;
				/* #endif */
				image{
					width: 60rpx;
				}
				text{
					width: 18rpx;
					height: 18rpx;
					background: linear-gradient(180deg, #FF7701 0%, #FF4B00 100%);
					border: 2rpx solid #231815;
					position: absolute;
					right: 0;
					top: 0;
					z-index: 99;
					border-radius: 50%;
				}
			}
		}
	}
</style>